package com.donggei.exp3.service.impl;


import com.donggei.exp3.dao.IUserDao;
import com.donggei.exp3.pojo.User;
import com.donggei.exp3.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements IUserService {
    @Autowired
    private IUserDao userDao;

    @Override
    public User getUser(Integer id) {
 
        return userDao.getUser(id);
    }

    @Override
    public Boolean insertUser(User user) {
 
        Boolean flag = false;
        System.out.println(user.getUserName() + ">>" + user.getNote());
        flag = userDao.insertUser(user);
        return flag;
    }

    @Override
    public List<User> findAllUser() {
 
        return userDao.findAllUser();
    }
}